package com.wgchao.amc.controller.base;

import com.wgchao.amc.common.ResultCommon;
import com.wgchao.amc.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName: LoginController
 * @author: wgchao
 * @createTime: 2019/11/1 1:48 PM
 * @Description: 登陆
 */
@RestController
@RequestMapping("/amc/sys/login")
@Api(tags = "登陆获取凭证")
public class LoginController {
    @Autowired
    private UserService userService;

    @GetMapping("/in/{uname}/{password}")
    @ApiOperation(value = "登入，获取凭证")
    public ResultCommon<String> in(@PathVariable String uname,
                                   @PathVariable String password) throws Exception{
        return userService.in(uname, password);
    }
}
